package com.dhl.factory.factorymethod.order;

import com.dhl.factory.factorymethod.pizza.LDCheessPizza;
import com.dhl.factory.factorymethod.pizza.LDPepperPizza;
import com.dhl.factory.factorymethod.pizza.Pizza;

/**
 * @title: BJOrderPizza
 * @Author danghailiang
 * @Date: 2022/7/27 21:08
 * @Version 1.0
 */
public class LDOrderPizza extends OrderPizza {

    @Override
    public Pizza createPizza(String type) {
        Pizza pizza = null;
        if ("伦敦芝士披萨".equals(type)) {
            pizza = new LDCheessPizza("伦敦芝士披萨");
        } else if ("伦敦胡椒披萨".equals(type)) {
            pizza = new LDPepperPizza("伦敦胡椒披萨");
        }
        return pizza;
    }
}
